/*
 * Copyright (c) 2018 maoyan.com
 * All rights reserved.
 *
 */
package com.darren.euc.repository;

import com.darren.euc.entity.MeetingroomOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;

/**
 * 在这里编写类的功能描述
 *
 * @author fangwenhao
 * @created 2018/3/13
 */
public interface MeetingroomOrderRepository extends JpaRepository<MeetingroomOrder,Integer>,JpaSpecificationExecutor {

    List<MeetingroomOrder> findByCreateTimeBetweenAndStatusAndSpaceId(Date startTime, Date endTime, Integer status,Integer spaceId);

    List<MeetingroomOrder> findByCreateTimeBetweenAndStatus(Date startTime, Date endTime, Integer status);

    List<MeetingroomOrder> findByCreateTimeBetweenAndSpaceId(Date startTime, Date endTime, Integer spaceId);

    List<MeetingroomOrder> findByCreateTimeBetween(Date startTime, Date endTime);

    List<MeetingroomOrder> findBySpaceIdAndStatusAndDayGreaterThanEqual(Integer spId, Integer status, Date day);

    List<MeetingroomOrder> findBySpaceIdAndStatusAndPayStatusNotAndDayGreaterThanEqual(Integer spId, Integer status, Integer payStatus, Date day);

    List<MeetingroomOrder> findBySpaceIdAndDayGreaterThanEqual(Integer spId,  Date day);

    List<MeetingroomOrder> findByStatusIn(List<Integer> statuses);

    List<MeetingroomOrder> findByStatusInAndAndPayStatusNotAndDayGreaterThanEqual(List<Integer> statuses,Integer payStatus,Date day);

    List<MeetingroomOrder> findByRoomIdAndDayAndStatusIn(Integer roomId, Date date, List<Integer> integerList);

    List<MeetingroomOrder> findByRoomIdAndDayAndStatusInAndPayStatusNot(Integer roomId, Date date, List<Integer> integerList,Integer payStatus);


}
